package main

import (
	"github.com/gin-gonic/gin"
	"zg3zk3/api"
	"zg3zk3/appconfig"
	"zg3zk3/inits"
)

func main() {

	appconfig.ViperDataFs()
	inits.MysqlInit()
	r := gin.Default()

	api.LoadRouter(r)
	r.GET("/ping", func(c *gin.Context) {
		c.JSON(200, gin.H{
			"message": "pong",
		})
	})
	r.Run(":8080") // 监听并在 0.0.0.0:8080 上启动服务
}
